home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Genius of Edison
/
The Genius of Edison (Version 1.0)(Softkey Multimedia)(GOE744AE-CD)(1996).ISO
/
pc
/
data
/
shared.cst
/
00106_Script_106
< prev
next >
Wrap
Text File
|
1996-09-03
|
2KB
|
69 lines
-- handler relinkToNewCast relinks members used in the score from cast oldCast to cast newCast.
on listSpritesInCast newCast,channelsToCheck
-- check all sprites if none specified
if voidP(channelsToCheck) then
set channelsToCheck = []
repeat with index = 1 to 48
add(channelsToCheck,index)
end repeat
end if
set lastFrame = the lastFrame
repeat with currentFrame = 1 to lastFrame
go frame currentFrame
repeat with currSprite in channelsToCheck
-- check if sprite contains cast
if the memberNum of sprite currSprite <> 0 then
-- if member exists in newCast then relink to new cast
if memberInCast(currSprite,newCast) then
-- relinkSpriteToCast(currSprite,newCast)
-- show where what is relinked
put "Frame "¤tFrame&" Sprite "&currSprite&" Member: "& the name of member the memberNum of sprite currSprite of castLib newCast &" in "& newCast
end if
end if
end repeat
end repeat
end
-- handler memberInNewCast returns TRUE if member aMember is in cast aCast, FALSE if it is not
on memberInCast aSprite,aCast
return the name of castLib (the castLibNum of sprite aSprite) = aCast
end
-- handler relinkSpriteToCast links member aMember to cast aCast
--
--on relinkSpriteToCast aSprite,aCast
-- -- find the number of the member in the oldCast
-- set memberNum = the number of member (the member of sprite aSprite)
--
-- -- find the number of the member with the same name in the new cast
-- set memberNumInCast = the number of member(the name of member memberNum) of cast aCast
--
-- -- link the sprite to the new member in the new cast
-- set the castLibNum of sprite aSprite to member memberNum of castLib aCast
--end
on hideBackButtonFirstVisitToWheel
global wheelAlreadyVisited , backCoverUpSprite
if voidP(wheelAlreadyVisited) then
set the visible of sprite backCoverUpSprite = TRUE
set wheelAlreadyVisited = true
else
set the visible of sprite backCoverUpSprite = FALSE
end if
end